<?php

abstract class Twis_Template_Base extends Twig_Template
{
    protected $context = array();

    public function setContext($name, $value)
    {
        $this->context[$name] = $value;
    }

    public function getContext($name)
    {
        if(!isset($this->context[$name])) {
            throw new Exception('Undefined context name: ' . $name);
        }
        return $this->context[$name];
    }
}
